package com.kly.sc.api.application.controller.product.response;

import com.kly.dto.ProductDescriptionDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import org.springframework.beans.BeanUtils;

@Data
@Builder
public class ProductDescriptionVO {

    private String tip;
    private String productCode;
    private String benefitNum;
    private String benefitUnit;
    private String price;
    private String priceOriginal;
    private String saving;
    private boolean check;
    private Integer sortBy;

    @ApiModelProperty(value = "折扣标签")
    private String popTag;

    @ApiModelProperty(value = "促销价格")
    private String promotionPrice;

    @ApiModelProperty(value = "标后价注释")
    private String promotionNote;

    @ApiModelProperty(value = "弹窗底部标题")
    private String popButtonTitle;

    @ApiModelProperty(value = "弹窗底部内容")
    private String popButtonContent;

    public static ProductDescriptionVO toVo(ProductDescriptionDto dto) {
        final ProductDescriptionVO vo = ProductDescriptionVO.builder().build();
        BeanUtils.copyProperties(dto, vo);
        return vo;
    }

}
